class RemoveItemRatingsTotalCount < ActiveRecord::Migration
  def self.up
    remove_column :item_ratings, :total_count
    ActiveRecord::Base.connection.execute("ALTER TABLE item_ratings ADD COLUMN up_vote_count int after comfort_rating")
    ActiveRecord::Base.connection.execute("ALTER TABLE item_ratings ADD COLUMN down_vote_count int after up_vote_count")
  end

  def self.down
    add_column :item_ratings, :total_count, :integer
    remove_column :item_ratings, :up_vote_count
    remove_column :item_ratings, :down_vote_count
  end
end
